<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/template/general.xhtml">
	
	<ui:define name="content">
		<div class="pageHeader">Alterar minha senha</div>
		
		<h:form id="updateForm">
			<p:growl autoUpdate="true" showDetail="true" life="5000" />
			
			<h:outputText value="Senha atual" /><br />
			<p:inputText type="password" value="#{usuarioBean.senha}" required="true" requiredMessage="Campo senha atual vazio." /><br />
			
			<h:outputText value="Nova senha" /><br />
			<p:inputText type="password" value="#{usuarioBean.novaSenha}" required="true" requiredMessage="Campo nova senha vazio." /><br /><br />
			
			<p:commandButton type="submit" value="Gravar" actionListener="#{usuarioBean.mudarSenha}" update="@form" />
		</h:form>
	</ui:define>
	
</ui:composition>